import request from '@/utils/request'

// 查询班组列表
export function listTeam(query) {
  return request({
    url: '/prs/team/list',
    method: 'get',
    params: query
  })
}

//字典
export function dictMatching (data) {
  return request({
    url: '/system/dict/data/type/'+ data,
    method: 'get',
  })
}

// 查询班组详细
export function getTeam(roleId) {
  return request({
    url: '/prs/team/' + roleId,
    method: 'get'
  })
}

// 新增班组
export function addTeam(data) {
  return request({
    url: '/prs/team',
    method: 'post',
    data: data
  })
}

// 修改班组
export function updateTeam(data) {
  return request({
    url: '/prs/team',
    method: 'put',
    data: data
  })
}


// 删除班组
export function delTeam(roleId) {
  return request({
    url: '/prs/team/' + roleId,
    method: 'delete'
  })
}

// 导出班组
export function exportTeam(query) {
  return request({
    url: '/prs/team/export',
    method: 'get',
    params: query
  })
}